<template>
    <div>
            
        <div class="record_page">
                  
            <div class="header">
                        
                <header>
                              <h3>约课记录</h3>
                              
                    <div class="right"></div>
                            
                </header>
                      
            </div>
                  
            <div class="van_tabs">
                        
                <div v-for="(item,index) in GoToClass" :key="index">
                              
                    <div :class="index===currentIndex?'van_tabs_actives':''"  @click="gotoclass(index)">
                                    <span>{{item}}</span>
                                  
                    </div>
                            
                </div>
                      
            </div>
                  
            <div class="van_pull_refresh">
                        
                <div class="van_pull_refresh_track">
                              
                    <div class="van_pull_refresh_head"></div>
                              
                    <div class="rp_empty">
                                    <img src="../../public/img/no-message.8d3ca5af.png"/>
                                    <p>还没有取消上课记录哦</p>
                                    
                        <button @click="oto">立即约课</button>
                                  
                    </div>
                            
                </div>
                      
            </div>
                
        </div>
    </div>
</template>

<script>
    export default {
        name: "Study",
        data() {
            return {
                GoToClass: ["待上课", "已上课", "已取消"],
                currentIndex: 0,
            };
        },
        methods: {
            // 动态绑定class
            gotoclass(index) {
                //   console.log(e);
                this.currentIndex = index;
            },
            // 点击立即约课
            oto() {
                this.$router.push({
                    path: "/oto"
                })
            }
        }
    }
</script>

<style scoped lang="scss">
    .record_page {
        padding-bottom: 17.33333vw;
        min-height: 100vh;
        box-sizing: border-box;
    }
    .header {
        height: 11.73333vw;
        line-height: 11.73333vw;
        background: #fff;
        border-bottom: 1px solid #eee;
        header {
            height: 11.73333vw;
            position: fixed;
            z-index: 999;
            width: 100%;
            background: #fff;
            h3 {
                font-size: 4.8vw;
                color: #595959;
                position: absolute;
                left: 50%;
                transform: translateX(-50%);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 66.66667vw;
            }
            .right {
                height: 100%;
                float: right;
                font-size: 4vw;
                color: #595959;
                padding: 0 2.66667vw;
            }
        }
    }
    .van_tabs {
        width: 100%;
        font-size: 4vw;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        line-height: 12vw;
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: #fff;
        color: #7d7e80;

        .van_tabs_actives {
            display: block;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            color: #eb6100;
            border-bottom: 3px solid #eb6100;
        }
    }
    .van_pull_refresh {
        overflow: hidden;
        user-select: none;
        .van_pull_refresh_track {
            transition: all 0ms ease 0s;
            position: relative;
            .van_pull_refresh_head {
                font-size: 1.86667vw;
                text-align: center;
            }
            .rp_empty {
                img {
                    display: block;
                    width: 47.73333vw;
                    height: 34.4vw;
                    margin: 26.66667vw auto 2.66667vw;
                }
                p {
                    font-size: 3.73333vw;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: #b7b7b7;
                    line-height: 5.33333vw;
                    margin-bottom: 6.66667vw;
                    text-align: center;
                }

                button {
                    margin: 0 auto;
                    display: block;
                    width: 23.46667vw;
                    height: 7.46667vw;
                    font-size: 3.46667vw;
                    color: #fff;
                    border: 1px solid #eb6100;
                    background: #eb6100;
                    border-radius: 0.66667vw;
                    ::before {
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        width: 100%;
                        height: 100%;
                        background-color: #000;
                        border: inherit;
                        border-color: #000;
                        border-radius: inherit;
                        -webkit-transform: translate(-50%, -50%);
                        transform: translate(-50%, -50%);
                        opacity: 0;
                        content: " ";
                    }
                }
            }
        }
    }
</style>